home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 1.iso / dist / fw_socks5.idb / usr / freeware / src / socks5 / patches.z / patches
Text File  |  1999-04-16  |  10KB  |  318 lines

  1. *** ./lib/Makefile.in    Tue Aug 26 17:21:55 1997
  2. --- ../socks5-v1.0r5/./lib/Makefile.in    Sat Jan 16 22:12:12 1999
  3. ***************
  4. *** 10,16 ****
  5.   BINRM    = @BINRM@
  6.   INSTALL  = @INSTALL@
  7.   RANLIB     = @RANLIB@
  8. ! AR       = ar rv
  9.   LDFLAGS  = @LDFLAGS@
  10.   LIBS     = @LIBS@
  11.   DLLIBS   = @DLLIBS@
  12. --- 10,16 ----
  13.   BINRM    = @BINRM@
  14.   INSTALL  = @INSTALL@
  15.   RANLIB     = @RANLIB@
  16. ! AR       = ar crv
  17.   LDFLAGS  = @LDFLAGS@
  18.   LIBS     = @LIBS@
  19.   DLLIBS   = @DLLIBS@
  20. *** ./lib/wrap.c    Thu Feb 19 13:49:58 1998
  21. --- ../socks5-v1.0r5/./lib/wrap.c    Sun Jan 17 21:54:25 1999
  22. ***************
  23. *** 63,69 ****
  24.   }
  25.   
  26.   /* wrapper around the connect system call.                                   */
  27. ! int LIBPREFIX(connect)(S5IOHandle sd, CONST ss *name, int namelen) {
  28.       int rval;
  29.   
  30.   #ifdef FOR_SHARED_LIBRARY
  31. --- 63,69 ----
  32.   }
  33.   
  34.   /* wrapper around the connect system call.                                   */
  35. ! int LIBPREFIX(connect)(S5IOHandle sd, CONST /* ss */ void *name, int namelen) {
  36.       int rval;
  37.   
  38.   #ifdef FOR_SHARED_LIBRARY
  39. ***************
  40. *** 87,93 ****
  41.   }
  42.   
  43.   /* wrapper around the bind system call.                                      */
  44. ! int LIBPREFIX(bind)(S5IOHandle sd, CONST ss *name, int namelen) {
  45.       int rval;
  46.   
  47.   #ifdef FOR_SHARED_LIBRARY
  48. --- 87,93 ----
  49.   }
  50.   
  51.   /* wrapper around the bind system call.                                      */
  52. ! int LIBPREFIX(bind)(S5IOHandle sd, CONST /* ss */ void *name, int namelen) {
  53.       int rval;
  54.   
  55.   #ifdef FOR_SHARED_LIBRARY
  56. ***************
  57. *** 111,117 ****
  58.   }
  59.   
  60.   /* wrapper around the getsockname system call.                               */
  61. ! int LIBPREFIX(getsockname)(S5IOHandle sd, struct sockaddr *name, int *namelen) {
  62.       int rval;
  63.   
  64.   #ifdef FOR_SHARED_LIBRARY
  65. --- 111,117 ----
  66.   }
  67.   
  68.   /* wrapper around the getsockname system call.                               */
  69. ! int LIBPREFIX(getsockname)(S5IOHandle sd, /* struct sockaddr */ void *name, int *namelen) {
  70.       int rval;
  71.   
  72.   #ifdef FOR_SHARED_LIBRARY
  73. ***************
  74. *** 136,142 ****
  75.   }
  76.   
  77.   /* wrapper around the getpeername system call.                               */
  78. ! int LIBPREFIX(getpeername)(S5IOHandle sd, struct sockaddr *name, int *namelen) {
  79.       int rval;
  80.   
  81.   #ifdef FOR_SHARED_LIBRARY
  82. --- 136,142 ----
  83.   }
  84.   
  85.   /* wrapper around the getpeername system call.                               */
  86. ! int LIBPREFIX(getpeername)(S5IOHandle sd, /* struct sockaddr */ void *name, int *namelen) {
  87.       int rval;
  88.   
  89.   #ifdef FOR_SHARED_LIBRARY
  90. ***************
  91. *** 161,167 ****
  92.   }
  93.   
  94.   /* wrapper around the send system call.                                      */
  95. ! IORETTYPE LIBPREFIX(send)(S5IOHandle sd, const IOPTRTYPE msg, IOLENTYPE len, int flags) {
  96.       int rval;
  97.   
  98.   #ifdef FOR_SHARED_LIBRARY
  99. --- 161,167 ----
  100.   }
  101.   
  102.   /* wrapper around the send system call.                                      */
  103. ! IORETTYPE LIBPREFIX(send)(S5IOHandle sd, const IOPTRTYPE msg, /* IOLENTYPE */ int len, int flags) {
  104.       int rval;
  105.   
  106.   #ifdef FOR_SHARED_LIBRARY
  107. ***************
  108. *** 185,191 ****
  109.   }
  110.   
  111.   /* wrapper around the sendto system call.                                    */
  112. ! IORETTYPE LIBPREFIX(sendto)(S5IOHandle sd, const IOPTRTYPE msg, IOLENTYPE len, int flags, struct sockaddr *to, int tolen) {
  113.       int rval;
  114.   
  115.   #ifdef FOR_SHARED_LIBRARY
  116. --- 185,191 ----
  117.   }
  118.   
  119.   /* wrapper around the sendto system call.                                    */
  120. ! IORETTYPE LIBPREFIX(sendto)(S5IOHandle sd, const IOPTRTYPE msg, /* IOLENTYPE */ int len, int flags, /* struct sockaddr */ const void *to, int tolen) {
  121.       int rval;
  122.   
  123.   #ifdef FOR_SHARED_LIBRARY
  124. ***************
  125. *** 209,215 ****
  126.   }
  127.   
  128.   /* wrapper around the recv system call.                                      */
  129. ! IORETTYPE LIBPREFIX(recv)(S5IOHandle sd, IOPTRTYPE msg, IOLENTYPE len, int flags) {
  130.       int rval;
  131.       
  132.   #ifdef FOR_SHARED_LIBRARY
  133. --- 209,215 ----
  134.   }
  135.   
  136.   /* wrapper around the recv system call.                                      */
  137. ! IORETTYPE LIBPREFIX(recv)(S5IOHandle sd, IOPTRTYPE msg, /* IOLENTYPE */ int len, int flags) {
  138.       int rval;
  139.       
  140.   #ifdef FOR_SHARED_LIBRARY
  141. ***************
  142. *** 233,239 ****
  143.   }
  144.   
  145.   /* wrapper around the recvfrom system call.                                  */
  146. ! IORETTYPE LIBPREFIX(recvfrom)(S5IOHandle sd, IOPTRTYPE msg, IOLENTYPE len, int flags, ss *from, int *fromlen) {
  147.       int rval;
  148.   
  149.   #ifdef FOR_SHARED_LIBRARY
  150. --- 233,239 ----
  151.   }
  152.   
  153.   /* wrapper around the recvfrom system call.                                  */
  154. ! IORETTYPE LIBPREFIX(recvfrom)(S5IOHandle sd, IOPTRTYPE msg, /* IOLENTYPE */ int len, int flags, /* ss */ void *from, int *fromlen) {
  155.       int rval;
  156.   
  157.   #ifdef FOR_SHARED_LIBRARY
  158. ***************
  159. *** 492,497 ****
  160. --- 492,505 ----
  161.   #endif
  162.   
  163.       REAL(longjmp)(env, val);
  164. + }
  165. + int LIBPREFIX(BSDlongjmp)(jmp_buf env, int val) {
  166. + #ifdef FOR_SHARED_LIBRARY
  167. +     lsInWrapFunction = 0;
  168. + #endif
  169. +     return REAL(BSDlongjmp)(env, val);
  170.   }
  171.   
  172.   #ifndef FOR_SHARED_LIBRARY
  173. *** ./lib/rld.c    Thu Feb 19 13:49:57 1998
  174. --- ../socks5-v1.0r5/./lib/rld.c    Sun Jan 17 21:57:19 1999
  175. ***************
  176. *** 270,275 ****
  177. --- 270,285 ----
  178.       ((void (*)(jmp_buf, int))func)(env, val);
  179.   }
  180.   
  181. + int REAL(BSDlongjmp) (jmp_buf env, int val) {
  182. +     static void *func = NULL;
  183. +     GetOriginalFunc(&func, "_BSDlongjmp", TRY_LIBC);
  184. +     if (!func || func == (void *)-1) return; 
  185. +     lsInRLDFunctions = 0;
  186. +     return ((int (*)(jmp_buf, int))func)(env, val);
  187. + }
  188.   int REAL(select)      (S5IOHandle wd, fd_set *rs, fd_set *ws, fd_set *es, struct timeval *to) {
  189.       GETFUNC("_select",       TRY_LIBC,                -1, (int (*)P((S5IOHandle, fd_set *, fd_set *, fd_set *, struct timeval *))), (wd, rs, ws, es, to), int);
  190.   }
  191. *** ./lib/wrap_tcp.c    Thu Feb 19 13:49:58 1998
  192. --- ../socks5-v1.0r5/./lib/wrap_tcp.c    Sat Jan 16 21:56:38 1999
  193. ***************
  194. *** 455,461 ****
  195.   /* with the server (recv a message), and then dup the file descriptor (***)  */
  196.   /* because clients usually close the acceptingfd and leave open the          */
  197.   /* accepted one.  Once we've done that, we add the connection, and return.   */
  198. ! S5IOHandle LIBPREFIX(accept)(S5IOHandle sd, ss *name, int *namelen) {
  199.       extern S5IOHandle LIBPREFIX(dup) P((S5IOHandle));
  200.       S5IOHandle fd = S5InvalidIOHandle;
  201.       lsSocksInfo *pcon, *ncon;
  202. --- 455,461 ----
  203.   /* with the server (recv a message), and then dup the file descriptor (***)  */
  204.   /* because clients usually close the acceptingfd and leave open the          */
  205.   /* accepted one.  Once we've done that, we add the connection, and return.   */
  206. ! S5IOHandle LIBPREFIX(accept)(S5IOHandle sd, /* ss */ void *name, int *namelen) {
  207.       extern S5IOHandle LIBPREFIX(dup) P((S5IOHandle));
  208.       S5IOHandle fd = S5InvalidIOHandle;
  209.       lsSocksInfo *pcon, *ncon;
  210. *** ./include/socks.h    Thu Feb 19 13:49:54 1998
  211. --- ../socks5-v1.0r5/./include/socks.h    Sun Jan 17 22:01:44 1999
  212. ***************
  213. *** 43,48 ****
  214. --- 43,49 ----
  215.   extern int LIBPREFIX(fclose)      P((FILE *));
  216.   extern struct tm * LIBPREFIX(localtime) P((const time_t *));
  217.   extern void        LIBPREFIX(longjmp)   P((jmp_buf, int));
  218. + extern int         LIBPREFIX(BSDlongjmp)      P((jmp_buf, int));
  219.   extern int LIBPREFIX(select)      P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
  220.   
  221.   extern struct hostent *LIBPREFIX(gethostbyname) P((char *));
  222. ***************
  223. *** 94,100 ****
  224. --- 95,108 ----
  225.   #define shutdown      LIBPREFIX(shutdown)
  226.   #define fclose        LIBPREFIX(fclose)
  227.   #define localtime     LIBPREFIX(localtime)
  228. + #if defined(sgi) && (defined(_BSD_SIGNALS) || defined(_BSD_COMPAT))
  229. + #undef longjmp
  230. + #define longjmp       LIBPREFIX(BSDlongjmp)
  231. + #else
  232.   #define longjmp       LIBPREFIX(longjmp)
  233. + #endif
  234.   #define close         LIBPREFIX(close)
  235.   #define dup2          LIBPREFIX(dup2)
  236.   #define dup           LIBPREFIX(dup)
  237. *** ./include/socks5p.h    Thu Feb 19 13:49:54 1998
  238. --- ../socks5-v1.0r5/./include/socks5p.h    Sat Jan 16 21:56:38 1999
  239. ***************
  240. *** 16,22 ****
  241.   #include "config.h"
  242.   #include "hide.h"
  243.   #include "includes.h"
  244. ! #include "hide.h"
  245.   #include "defs.h"
  246.   #include "socks5api.h"
  247.   #include "system.h"
  248. --- 16,22 ----
  249.   #include "config.h"
  250.   #include "hide.h"
  251.   #include "includes.h"
  252. ! #include "unhide.h"
  253.   #include "defs.h"
  254.   #include "socks5api.h"
  255.   #include "system.h"
  256. *** ./include/system.h    Thu Feb 19 13:49:54 1998
  257. --- ../socks5-v1.0r5/./include/system.h    Sun Jan 17 22:02:11 1999
  258. ***************
  259. *** 48,53 ****
  260. --- 48,54 ----
  261.   
  262.   struct tm *      REAL(localtime)    P((const time_t *));
  263.   void             REAL(longjmp)      P((jmp_buf, int));
  264. + int              REAL(BSDlongjmp)   P((jmp_buf, int));
  265.   int              REAL(fclose)       P((FILE *));
  266.   int              REAL(close)        P((S5IOHandle));
  267.   int              REAL(shutdown)     P((S5IOHandle, int));
  268. *** ./include/hide.h    Thu Feb 19 13:49:54 1998
  269. --- ../socks5-v1.0r5/./include/hide.h    Sun Jan 17 22:00:16 1999
  270. ***************
  271. *** 34,39 ****
  272. --- 34,40 ----
  273.   #define shutdown      HIDE(shutdown)
  274.   #define listen        HIDE(listen)
  275.   #define longjmp       HIDE(longjmp)
  276. + #define BSDlongjmp    HIDE(BSDlongjmp)
  277.   #define close         HIDE(close)
  278.   #define flcose        HIDE(fclose)
  279.   
  280. ***************
  281. *** 62,67 ****
  282. --- 63,69 ----
  283.   #undef shutdown      
  284.   #undef listen        
  285.   #undef longjmp        
  286. + #undef BSDlongjmp        
  287.   #undef close         
  288.   #undef flcose        
  289.   
  290. *** ./server/flow.c    Thu Feb 19 13:49:59 1998
  291. --- ../socks5-v1.0r5/./server/flow.c    Sat Jan 16 21:56:38 1999
  292. ***************
  293. *** 68,74 ****
  294.       }
  295.   
  296.       for (fds = bu ; ; fds = bu) {
  297. !     struct timeval tout = { idletimeout*60, 0 };
  298.   
  299.       if (!FD_ISSET(iio->fd,  &fds) && !FD_ISSET(oio->fd, &fds)) {
  300.           S5LogUpdate(S5LogDefaultHandle, S5_LOG_WARNING, 0, "Flow Recv: Neither file descriptor is set");
  301. --- 68,76 ----
  302.       }
  303.   
  304.       for (fds = bu ; ; fds = bu) {
  305. !     struct timeval tout;
  306. !     tout.tv_sec = idletimeout*60;
  307. !     tout.tv_usec = 0;
  308.   
  309.       if (!FD_ISSET(iio->fd,  &fds) && !FD_ISSET(oio->fd, &fds)) {
  310.           S5LogUpdate(S5LogDefaultHandle, S5_LOG_WARNING, 0, "Flow Recv: Neither file descriptor is set");
  311.